package com.xuef.dfs.datanode.server;

import com.xuef.dfs.namenode.rpc.model.HeartbeatRequest;
import com.xuef.dfs.namenode.rpc.model.HeartbeatResponse;
import com.xuef.dfs.namenode.rpc.service.NameNodeServiceGrpc;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;

import java.util.concurrent.CountDownLatch;

public class NameNodeOfferService {

    private NameNodeServiceActor serviceActor;

    public NameNodeOfferService(){
        this.serviceActor = new NameNodeServiceActor();
    }

    /**
     * datanode 节点启动后，先注册到namenode
     * 注册成功后，开启一个线程，维持心跳
     */
    public void start() {
        this.serviceActor.start();
    }

}
